import { SchemaFactory } from '@nestjs/mongoose'
import { User } from 'src/interface/user.interface'

export const UserSchema = SchemaFactory.createForClass(User)

UserSchema.pre('save', function (next: Function) {
    // if (!this.createdAt) this.createdAt = new Date();
    next()
})